<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>产品编辑</title>    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<s:head theme="simple"/>
	<link rel="stylesheet" href="../theme1/css/reset.css" type="text/css"/>
	<link rel="stylesheet" href="../theme1/css/screen.css" type="text/css"/>
	<link rel="stylesheet" href="../theme1/css/screen-common.css" type="text/css"/>	
	<script type="text/javascript" src="../js/jquery.js"></script>
	<script type="text/javascript" src="../theme1/js1/script.js"></script>	
	<script type="text/javascript" src="../ckedit/ckeditor/ckeditor.js"></script>
	<script type="text/javascript" src="../ckedit/ckfinder/ckfinder.js"></script>
  </head>
  
  <body>
  <div class="page wrap" >
  <!-- menu bar -->
  <div class="menubar clear" >
	  <ul class="menus clear">
		  <li><a href="Product_edit.action">添加产品</a></li>
		  <li><a href="Product_list.action">返回列表</a></li>
	  </ul>
  </div>
   <div class="content-box">
   <div class="box-header clear">					
			<h2>产品编辑</h2>
    </div>
    <div class="box-body clear">	  
  	<s:actionerror/>
  	<s:actionmessage/>
  	<form class="form" action="Product_saveedit.action" method="post" >	  	
	  <s:hidden name="product.id"></s:hidden>
	  <s:hidden name="product.shopId"></s:hidden>	
	  <div class="form-field clear">	  	
	  	<label class="form-label fl-space2" for="product_shopId">所属网店： </label>
	  	<s:textfield name="product.shopId"></s:textfield>
	  	<span class="required">*</span>
	  </div> 
	  <div class="form-field clear">
	  	<label class="form-label fl-space2" for="product_categoryId">分类： </label>
	  	<s:select list="categories" listKey="id" listValue="categoryName" name="product.categoryId"></s:select>
	  	<span class="required">*</span>
	  	<a href="Category_list.action">管理分类</a>
	  </div>
	  <div class="form-field clear">
	  	<label class="form-label fl-space2" for="product_productName">产品名称： </label>
	  	<s:textfield name="product.productName"></s:textfield>	  	
	  </div>  
	  <div class="form-field clear">
	  	<label class="form-label fl-space2" for="product_productAbstract">产品摘要： </label>
	  	<s:textarea name="product.productAbstract" rows="10" cols="20"></s:textarea>
	  	<span class="required">*</span>
	  </div>
	  <div class="form-field clear">
	  	<label class="form-label fl-space2" for="product_productIntroduction">产品介绍： </label>
	  	<s:textarea name="product.productIntroduction" rows="10" cols="20"></s:textarea>
	  	<span ></span>
	  </div>
	   <div class="form-field clear">
	  	<label class="form-label fl-space2" for="product_isVisiable">是否发布： </label>
	  	<s:checkbox name="product.isVisible" value="1"></s:checkbox>
	  	<span ></span>
	  </div>
	   <div class="form-field clear">
	  	<label class="form-label fl-space2" for="product_productPic">产品图片： </label>
	  	<s:textfield name="product.productPic"></s:textfield>
	  	<span ></span>
	  </div>	   	
	  <div class="form-field clear" style="display:inline-block">
			<input type="submit" value="提交" class="submit fr">
	  </div> 	  
  </form>
  </div>
  </div>
  </div>
  <script type="text/javascript">
		// This is a check for the CKEditor class. If not defined, the paths must be checked.
		if ( typeof CKEDITOR == 'undefined' )
		{
			document.write(
				'<strong>文本编辑器控件异常！</strong>' ) ;
		}
		else
		{
			var editor = CKEDITOR.replace( 'product_productIntroduction' );
			editor.setData( $("#product_productIntroduction").val());
			
			// Just call CKFinder.SetupCKEditor and pass the CKEditor instance as the first argument.
			// The second parameter (optional), is the path for the CKFinder installation (default = "/ckfinder/").
			CKFinder.setupCKEditor( editor, '../../ckedit/ckfinder/' ) ; //第二个参数为ckfinder文件夹位置
		
			// It is also possible to pass an object with selected CKFinder properties as a second argument.
			// CKFinder.SetupCKEditor( editor, { BasePath : '../../', RememberLastFolder : false } ) ;
			//alert($(window.parent.document).find("#mainframe").width());
			
		}
</script> 
	
  </body>
</html>
